package com.example.demo.yuy.demo.controller;

import com.example.demo.aspect.WebLog;
import com.example.demo.config.ResponseHelper;
import com.example.demo.config.ResponseModel;
import com.example.demo.yuy.demo.vo.ExampleVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述
 *
 * @author: yuy
 */
@RestController
public class ExampleController {

    @PostMapping(path = "/test")
    @WebLog
    @ApiOperation(value = "表哥测试接口",consumes = "application/json")
    public ResponseModel<ExampleVo> test(@RequestParam(name = "cid",required = false) String cid) {

       /* if (StringUtils.isEmpty(cid)) {
            throw new BusinessException("测试数据不能为空");
        }*/
        ExampleVo vo = new ExampleVo();
        vo.setEnable(false);
        return ResponseHelper.success(vo,null);
    }
}
